package com.qf.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @author sunyamei
 * @version V1.0
 * @Project javase2203
 * @Package com.qf.pojo
 * @Description:
 * @Date 2022/8/5 11:10
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Person {

    //json转换的时候忽略这个ID
    @JsonIgnore
    private  String id;

    //姓名
    private  String name;

    //年龄
    private  Integer age;

    //出生日期,日期格式必须和es这个索引字段的日期格式保持一致
    @JsonFormat(pattern =  "yyyy-MM-dd")
    private Date birthday;
}
